<template>
  <!-- 财务统计-- 其他统计 -->
  <div class="countList">
    <div class="itemList">
      <div class="item">
        <div class="info">
          <div class="value">
            <p class="num">{{ countData.loanTotalMoney ?? 0 }}</p>
            <p class="unit">元</p>
          </div>
          <p class="name">借款总额</p>
        </div>
        <img
          :src="require('/public/img/finance_icon1.webp')"
          alt=""
          class="img"
        />
      </div>
      <div class="item">
        <div class="info">
          <div class="value">
            <p class="num">{{ countData.reimburseYearMoney ?? 0 }}</p>
            <p class="unit">元</p>
          </div>
          <p class="name">报销总额</p>
        </div>
        <img
          :src="require('/public/img/finance_icon2.webp')"
          alt=""
          class="img"
        />
      </div>
      <div class="item">
        <div class="info">
          <div class="value">
            <p class="num">{{ countData.paymentYearMoney ?? 0 }}</p>
            <p class="unit">元</p>
          </div>
          <p class="name">付款总额</p>
        </div>
        <img
          :src="require('/public/img/finance_icon3.webp')"
          alt=""
          class="img"
        />
      </div>
    </div>
    <div class="itemList">
      <div class="item">
        <div class="info">
          <div class="value">
            <p class="num">{{ countData.loanMonthMoney ?? 0 }}</p>
            <p class="unit">元</p>
          </div>
          <p class="name">借款月总额</p>
        </div>
        <img
          :src="require('/public/img/finance_icon1.webp')"
          alt=""
          class="img"
        />
      </div>
      <div class="item">
        <div class="info">
          <div class="value">
            <p class="num">{{ countData.reimburseMonthMoney ?? 0 }}</p>
            <p class="unit">元</p>
          </div>
          <p class="name">报销月总额</p>
        </div>
        <img
          :src="require('/public/img/finance_icon2.webp')"
          alt=""
          class="img"
        />
      </div>
      <div class="item">
        <div class="info">
          <div class="value">
            <p class="num">{{ countData.paymentMonthMoney ?? 0 }}</p>
            <p class="unit">元</p>
          </div>
          <p class="name">付款月总额</p>
        </div>
        <img
          :src="require('/public/img/finance_icon3.webp')"
          alt=""
          class="img"
        />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: '',
  data () {
    return {}
  },
  props: {
    countData: {
      type: Object, default: () => { }
    }
  },
}
</script>
<style lang="scss" scoped>
.countList {
  // display: flex;
  flex-basis: calc(100% / 2);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: auto;
  .itemList {
    display: flex;
  }
  .item {
    position: relative;
    display: flex;
    // justify-content: space-around;
    align-items: center;
    flex-basis: calc(100% / 3);
    min-width: 200px;
    // height: 150px;
    height: calc(300px / 2 - 10px);
    padding: 0 30px;
    margin: 0 20px 0 0;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0px 0px 11px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    &:last-child {
      margin-right: 0;
    }
  }
  .value {
    display: flex;
    align-items: baseline;
    margin-right: 25px;
    .num {
      font-weight: 600;
      font-size: 28px;
      margin-right: 5px;
    }
    .unit {
      color: #666;
    }
  }
  .name {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
  }
  .img {
    position: absolute;
    right: -20px;
    bottom: -20px;
    // transform: scale(0.7);
  }
}
</style>